<?php if(!defined('SABLOG_ROOT')) exit('Access Denied');?>
{template header}

	<div id="page">
		<div id="wrap">
			<h3 class="title">高级搜索</h3>
			<form method="post" action="$options[url]post.php">
			<input type="hidden" name="formhash" value="$formhash" />
			<input type="hidden" name="action" value="search" />
			<table width="100%" border="0" cellpadding="0" cellspacing="0" class="formbox">
				<tr>
					<td colspan="3">关键字:<br />
						<input name="keywords" type="text" size="30" value="" class="formfield" />
						关键字中可使用通配符 &quot;*&quot;
						<br /><br />
						匹配多个关键字全部, 可用空格或 &quot;AND&quot; 连接. 如 angel AND 4ngel<br />匹配多个关键字其中部分, 可用 &quot;|&quot; 或 &quot;OR&quot; 连接. 如 angel OR 4ngel</td>
				</tr>
				<tr>
					<td colspan="3"><hr /></td>
				</tr>
				<tr>
					<td width="48%" valign="top">
					<fieldset>
						<legend>搜索分类</legend>
						<select name="cid[]" multiple="multiple" style="width:100%" size="8">
							<option value="" selected="selected">搜索所有分类</option>
							<!--{loop $catecache $data}-->
								<option value="$data[cid]">&nbsp;&nbsp;&#0124;-- $data[name]</option>
							<!--{/loop}-->
						</select>允许选择多个分类
					</fieldset>
					</td>
					<td width="4%" align="center">&nbsp;&nbsp;&nbsp;&nbsp;</td>
					<td width="48%" valign="top">
					<fieldset>
						<legend>搜索时间</legend>
						<select id="dateline" name="dateline">
							<option value="0">全部时间</option>
							<option value="86400">1 天</option>
							<option value="172800">2 天</option>
							<option value="432000">1 周</option>
							<option value="1296000">1 个月</option>
							<option value="5184000">3 个月</option>
							<option value="8640000">6 个月</option>
							<option value="31536000">1 年</option>
						</select>
						<label><input type="radio" name="before" value="" checked="checked" /> 以内</label>
						<label><input type="radio" name="before" value="1" /> 以前</label>
					</fieldset>
					<fieldset>
						<legend>搜索方式</legend>
						<select name="searchin">
							<option value="title" selected="selected">标题搜索</option>
							<option value="content">全文搜索</option>
						</select>
					</fieldset>
					<fieldset>
						<legend>搜索结果按照</legend>
						<select name="sortby">
							<option value="dateline" selected="selected">发表时间</option>
							<option value="views">阅读次数</option>
							<option value="comments">评论数量</option>
						</select>
						<select name="orderby">
							<option value="desc" selected="selected">降序排列</option>
							<option value="asc">升序排列</option>
						</select>
					</fieldset>
					</td>
				</tr>
				<tr>
					<td colspan="3" valign="top"><hr /></td>
				</tr>
				<tr>
					<td colspan="3" align="center"><button type="submit">确定</button></td>
				</tr>
			</table>
			</form>
		</div>
		<div id="sidebar">

			<!--{if $options['show_calendar']}-->
				<div id="showcalendar">
					<table cellpadding="0" cellspacing="1" style="width:100%">
						<tr align="center">
							<td colspan="7" class="curdate"><a href="$prevmonth">&laquo;</a> $calendar[cur_date] <a href="$nextmonth">&raquo;</a></td>
						</tr>
						<tr>
							<th class="week"><span style="color:#833">日</span></th>
							<th class="week">一</th>
							<th class="week">二</th>
							<th class="week">三</th>
							<th class="week">四</th>
							<th class="week">五</th>
							<th class="week"><font color="#53A300">六</font></th>
						</tr>
						$calendar[html]
					</table>
				</div>
			<!--{/if}-->

			{template sidecomm}

			<!--{if $options['archives_num']}-->
				<h4>Archives</h4>
				<ul>
					<!--{if !$archivecache}-->
						<li>没有任何归档</li>
					<!--{else}-->
						<!--{loop $archivecache $key $data}-->
						<li><a href="$data[url]">$key</a> <span>($data[num])</span></li>
						<!--{/loop}-->
					<!--{/if}-->
				</ul>
			<!--{/if}-->
		</div>
	</div>